class Admin::OptionsController < Admin::BaseController
	
  verify :method => :post, :only => [:update], :redirect_to => {:action => 'edit'}
  
  def index
    edit
    render :action => 'edit'
  end
  
  def edit
    @lough = current_lough
    @action_title = 'Options'
  end
  
  def update
  	if request.post?
	  @lough = Lough.find(params[:id])
	  if @lough.update_attributes(params[:lough].symbolize_keys)
	    flash[:notice] = "Success: options was saved."
	    redirect_to :action => 'edit'
	  else
	    render :action => 'edit'
	  end
	end
  end
end
